#include "..\include\imp_typedefine.h"
#include "..\include\imp_io_wrapper.h"
#include "..\include\imp_pictext_wrapper.h"

extern "C" Int32 mbm_jpeg_init(void);
extern "C" ImpBool mbm_jpeg_decode(Int32 inst, Int8 *jpeg_data, Int32 jpeg_len, Int8 **rgb24_buf, Int32 *w, Int32 *h);
extern "C" void mbm_jpeg_deinit(Int32 inst);
extern "C" ImpBool mbm_png2bmp_file(ImpCStr pngName, ImpCStr bmpName);
extern "C" ImpBool mbm_jpeg2bmp_file(ImpCStr pathname, ImpStr bmpname);

ImpBool impict_png2bmp_file(ImpCStr pngName, ImpCStr bmpName)
{
	return mbm_png2bmp_file(pngName, bmpName);
}

ImpBool impict_jpeg2bmp_file(ImpCStr pathname, ImpStr bmpname)
{
	return mbm_jpeg2bmp_file(pathname, bmpname);
}

Int32 impict_jpeg_init(void)
{
	return mbm_jpeg_init();
}

void impict_jpeg_deinit(Int32 inst)
{
	mbm_jpeg_deinit(inst);
}

ImpBool impict_jpeg_decode(Int32 inst, Int8 *jpeg_data, Int32 jpeg_len, Int8 **rgb24_buf, Int32 *w, Int32 *h)
{
	return mbm_jpeg_decode(inst, jpeg_data, jpeg_len, rgb24_buf, w, h);
}

